package cn.wolfcode.car.business.service;


import cn.wolfcode.car.business.domain.BpmnInfo;
import cn.wolfcode.car.business.query.BpmnInfoQuery;
import cn.wolfcode.car.common.base.page.TablePageInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;

/**
 * 流程定义接口
 */
public interface IBpmnInfoService extends IService<BpmnInfo> {

    /**
     * 分页
     * @param qo
     * @return
     */
    TablePageInfo<BpmnInfo> query(BpmnInfoQuery qo);



    /**
     * 流程定义部署
     * @param path
     * @param bpmnType
     * @param info
     */
    void deploy(String path, String bpmnType, String info) throws FileNotFoundException;

    /**
     * 删除流程部署
     * @param id
     */
    void deleteDeployment(Long id);

     /**
     * 查询流程定义xml文件与流程定义图
     * @param deploymentId
     * @param type
     */
     InputStream readResourceOrType(String deploymentId, String type) throws IOException;

    /**
     * 审核流程定义类型
     * @param car_package
     * @return
     */
    BpmnInfo queryByType(String car_package);
}
